-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ports vape [w/ fixes] #90
base: master
Are you sure you want to change the base?
Conversation
var/emagged = 0 //LET THE GRIEF BEGIN | ||
|
||
/obj/item/clothing/mask/vape/suicide_act(mob/user) | ||
var/mob/living/carbon/human/H = user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops sorry, yeah, drop that, but be sure to check if the mob can have internal organs before touching said organs
|
||
/obj/item/clothing/mask/vape/suicide_act(mob/user) | ||
var/mob/living/carbon/human/H = user | ||
var/obj/item/organ/brain/B = H.getorgan(/obj/item/organ/brain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use user.getorgan here instead
if (H && !qdeleted(H)) | ||
if (B && !qdeleted(B)) | ||
H.internal_organs -= B | ||
qdel(B) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didn't check if user is actually an human yet. You should always do that before using an human only var.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you cannot remove an organ directly from the list like that. You must use B.Remove(H).
/obj/item/clothing/mask/vape/attackby(obj/item/O, mob/user, params) | ||
if(istype(O, /obj/item/weapon/screwdriver)) | ||
if(!screw) | ||
screw = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use true/false instead of 0s and 1s
if(!screw) | ||
screw = 1 | ||
flags |= OPENCONTAINER | ||
user << "<span class='notice'>You open the cap on the [src].</span>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on the [name], src is a reference, an object
if(screw && !emagged)//also kinky | ||
if(!super) | ||
overlays.Cut() | ||
super = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true/false
overlays += I | ||
else | ||
overlays.Cut() | ||
super = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true/false
if(reagents.total_volume) | ||
if(iscarbon(loc)) | ||
var/mob/living/carbon/C = loc | ||
if (src == C.wear_mask && reagents.total_volume) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you checking total_volume again?
if(!reagents.total_volume) | ||
if(ismob(loc)) | ||
M << "<span class='notice'>The [name] is empty!</span>" | ||
SSobj.processing.Remove(src) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem
return | ||
//open flame removed because vapes are a closed system, they wont light anything on fire | ||
|
||
if(super && vapetime > 3)//Time to start puffing those fat vapes, yo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't 3 a bit too low?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's about 8 seconds.
M.apply_damage(15, BURN, "head") //Less damage | ||
M.unEquip(src, 1) | ||
M.Weaken(15, 1, 0) | ||
qdel(src) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you qdel src, the proc will stop playing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete it after you did everything you had to do.
M.apply_damage(20, BURN, "head") | ||
M.unEquip(src, 1) | ||
M.Weaken(15, 1, 0) | ||
qdel(src) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
Made the requested changes. |
How exactly is this is this fixing the chemical duplicating thing? I am legit confused. |
TG's vape with a number of fixes, including: